package br.iars.web.model.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "user")
@AttributeOverride(name = "id", column = @Column(name = "user_id"))
public class User extends GenericEntity<Long> {

	private static final long serialVersionUID = -1300981206034223813L;

	@Column(name = "email", nullable = false, unique = true)
	private String email;

	public User() {
		super();
	}

	public User(Long id) {
		super(id);
	}

	public User(Long id, String email) {
		super(id);
		this.email = email;
	}

	public User(String email) {
		super();
		this.email = email;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String toString() {
		return "User [email=" + email + ", id=" + getId() + "]";
	}

}
